<?php
namespace App\Traits;

trait ReturnTrait{
    public function success($data=[])
    {
        return [
            'success' => true,
            'data' => $data
        ];
    }

    public function error($msg,$data=[])
    {
        return [
            'success' => false,
            'msg' => $msg,
            'data' => $data
        ];
    }
}
